package com.tbit.uqbike.push.aop;

import org.apache.log4j.Logger;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class ExceptionIntercept {
    private final static Logger log = Logger.getLogger(ExceptionIntercept.class);

    @Pointcut("execution(* com.sscm.service.*.*(..))")
    public void anyMethod() {
    }

    @AfterThrowing(pointcut = "anyMethod()", throwing = "e")
    public void doAfterThrowing(RuntimeException e) {
        log.error("RuntimeException异常", e);
    }
}